package com.bsierp.business.pojo;

/**
 * ProductOrderParameterId entity. @author MyEclipse Persistence Tools
 */

public class ProductOrderParameterId implements java.io.Serializable {

    // Fields

    private Product product;
    private ProductParameter productParameter;

    // Constructors

    /** default constructor */
    public ProductOrderParameterId() {
    }

    /** full constructor */
    public ProductOrderParameterId(Product product,
            ProductParameter productParameter) {
        this.product = product;
        this.productParameter = productParameter;
    }

    // Property accessors

    public Product getProduct() {
        return this.product;
    }

    public void setProduct(Product product) {
        this.product = product;
    }

    public ProductParameter getProductParameter() {
        return this.productParameter;
    }

    public void setProductParameter(ProductParameter productParameter) {
        this.productParameter = productParameter;
    }

    public boolean equals(Object other) {
        if ((this == other))
            return true;
        if ((other == null))
            return false;
        if (!(other instanceof ProductOrderParameterId))
            return false;
        ProductOrderParameterId castOther = (ProductOrderParameterId) other;

        return ((this.getProduct() == castOther.getProduct()) || (this
                .getProduct() != null
                && castOther.getProduct() != null && this.getProduct().equals(
                castOther.getProduct())))
                && ((this.getProductParameter() == castOther
                        .getProductParameter()) || (this.getProductParameter() != null
                        && castOther.getProductParameter() != null && this
                        .getProductParameter().equals(
                                castOther.getProductParameter())));
    }

    public int hashCode() {
        int result = 17;

        result = 37 * result
                + (getProduct() == null ? 0 : this.getProduct().hashCode());
        result = 37
                * result
                + (getProductParameter() == null ? 0 : this
                        .getProductParameter().hashCode());
        return result;
    }

}